edited database.php
simple changes to app/*
split template and astnode