refactor Modem classes