Code cleanup

General code cleanup. Functionality not modified.