Refactoring  -> AMD with require -> directory structure change