Moved lots of shared code to RannUtil project.