Draft 2

Fixed some major flaws. Still needs to be cleaned up. It runs and
basically works at this point.