[Tak] Move code into other HTML files, and use angular custom directives