Fix gradle issue and reorganize project structure.