moving test to correct packages, fixing errors in controller logic