Started refactoring of create_from_token, needs to pass tests