Moved print, diagnostic, and scale code to member functions to clean
up the main routine.  Began algorithms to make rational choices for
the final solutions (ordering, parity, rotation of degenerate solutions).