Restructured source files and added gradle build file.