Fixed upstart script, added more templates + template handling.