Refactored and moved code around
Merge pull request #57 from villanuevawill/refactor/directives

Refactored and moved code around