Defined a method on a scope & refactored directory structure