Version 0.1.6.

Added exceptions everywhere to make code more safe.