moved all UI classes out of directive