Refactor of core done.