Fixed java loader bugs and started conversion