moved more core functionality into modules