added external template
cleaned code
removing database user creation
added host option