refactor viewController and some ui