style and moved a few controller things to directives