various bugfixes
add compatible templates
Add backward compatibility layer