restructured templates and added init code
proper location, optons support, live cmds