Begining code cleanup