Cleaned up logging and button interactions.