EJS implementation for templates, fileuploader class refactor