Added logfile setup and deamon start/shutdown
Added template stack