restructured code a little bit, add error handling closes #3 (i think)
update version number