updates to port original code to directives and services. Removed some accidentally added libraries