Code cleanup. Make some properties private, use some method references, remove some unused imports.