cleaned up some system.err statements; extracted PrefixComparator class from inner class to regular class