clean up code
moved rating directive to directives file