refactor dependencies and defaults in lexical order