see desc

restructure
using booleans for true/false statemens from config
cleanup a few if statements