fixed template system + added bridge to PHPTAL fixed bugs and cleaned up