Feature/cleanup code

Cleanup code: shorten methods, fix typos etc.