cleaning up code, improving the default template