Working on cleaning this up a bit before moving onto docker integration