Changes for a implementation using button listeners