Committing initial refactor with trialware stuff removed. Moving on to refactor code, add a few features, and fix a couple of bugs.