Improved codestyle and comments