cleaned up the code to use the templating system better
updated server config to save SSL setup