Integrated template and added logging to service