Break up big one-file implementation into more standard gem structure

This commit just busts the one giant file up into three logical files and requires them.  Hopefully makes for easier maintenance moving forward.