Abstracted a few things and cleaned up a little more.