cleaned up code, no functional changes