Some untested refactorings, also integrated the boolean parser