Added some minor tests and better gradle build script