Rewrite of old template from the BMM project to make it work with relativ design. Code is now written into directives.