More work on porting to JavaFX