Optimize - make g_bitsRemaining a register variable.
Add upper bound to timer counter. Move some initialization code from main.cpp to board.h.