Removed merging of assets since it causes issues when external and inline scripts are mixed. Also fixed a spelling mistake renderd -> rendered. Finally, removed a few unused variables