Fixed some issues with missing variables and also the whitespace on the controller