refactored test and cleaned up/fixed controllers