Remove unused functions, set java offset