remove deprecated method and refactor Module class