refactoring file hierarchy, refactoring moto flipping, improvement of ghost to make it compatible with the ghost flipping