Reorganize the folders

Put existing files in core/engine to prepare next PR.