cleaning up code (lint warnings and general inspection)