Resource refactoring.

* Moves static files from templates to resources
* Uses img filter instead of imgfolder. Works like css and js