debug flag, update sun fixed

Added a flag that can turn on and off messages to the console.

fixed a button problem.