more java compatability, better file loading