1. Fixing race condition when mCurbutton was set to null after calling
   setLayoutParams() but before the button was actually redrawn on the screen
2. Some commends added
3. Minor cleanups