Various bug fixes and a little bit of documentation. Version 0.1.1