Refactors spec and moves methods out of controller