added command to create directive, modified controller create function to reduce lines of code