Added basic ui controlling code