Creating UI and some functionality