Cleaned up code a bit, added in better button code