fixed issues
quick refactor and clarity
added specs for the controller