First commit of v0.2. Fixes #6, #7, #8, #9 and #10.