Java-fying old C stuff