refactor ui elements into namespace