Remove unused code from JS
Removed static CSS and JS from the template, moved to template function