Adding Beeper code.
Fixing up the timing loops so they are cleaner.