Move loader into a java class
Didn't mean to commmit this