Fixed some bugs
Autoformat code
Merge pull request #5 from plasmLC/master

Bugfixes and code reading.