Fixed all broken references, refactored some stuff here and there,
standardized nomenclature.   Ready to test...