Added basic gui logic