Cleaned up the code a little in the controller
Some test stuff