Refactored code to comply own standard.

fixes #11