homepage code cleanup