Introduced some directives. Learnt not to do DOM manipulation in the controller