Gradle wrapper refactor, Travis fix and FreeMarker fix