Refactor and redesign input part of UI