Complete migrating to javafx, working version