refined a lot of styling and functionality and separated things into directives.