Major overhaul to eliminate global variables and define likelihood object class.  May not be fully debugged...