Refactoring, some styling

Refactored the adding checkboxes function. Still messy. Added some
overall styling.