Fixing crash on mac. Making test and checkboxes align on the mac. Adding platform dependent code.