Created common template directory. Some fixes