Reworked db connection and template parsing