Divided classes into UI logic and logic logic