Merge pull request #11 from Vampire/master

Some fixes and improvements