Cleaned up code

standardised calling of module functions with modules instead of this
added helper function to build divs
removed eval expressions
ultilised Lo-dash framework
cleaned up variable declarations