added a bunch of directives and split up better