Migrate to Gradle, fixed installer-bug, several minor bugs