Improved tests and separated them by their functions

TODO: Controller tests