Trying to get this library ported to the spark core.