Make Homepage code simpler