Finished code cleanup