Feature/code cleanup

Please comment my code cleanup. I didn't do any architectural changes yet, it's only about better readability and maintainability for now.