Started trying to convert Python stuff to Java