Cleaned up button code