My Extended Euclidean Algorithm implemented in Java