refactored initial directive and added comments, working
Merge branch 'dev'