added controller stuff: reorganizing everything