Made better use of expansion field. Cleaned up some more unnecessary code.