Move closer to clean-code standards.

Try to refactor towards more clean-code standards.