Added a Gradle build system
Fixed errors