Started splitting code out to actually form a usable library