refactor code

adjust some UI