Updated template folder layout
Fixed some bugs and cleaned up templates. Also fixed some odd logic behaviour and a problem being caused by a lack of dbo.session.rollback()