First code cleanup