Homepage code cleanup