Removed broken code fragment from Cinnamon 2 to 3 migration.
Cleanup code: reduce number of IDE warnings for real / potential problems.

Replace deprecated method calls in easy cases, fix minor assignment issues, add some javadoc etc.