merge old and new class
slightly reorganise class hierarchy