adding checkbox controls and fixing some layout bugs