java api a bit friendlier
cleanup + save functionality