Partially refactored -- no Vector implementation yet.