Controller cleanup and test