modem refactor, auth repetition removed, wip