made package external and using rawjs as template engine