Added persistant variables + added button ui code