Changed helper funcs to act with postgresql, final improvements in view and templates structure to lessen db loab