refactored, bug checked, isolated, rebug checked, reisolated, made a few areas friendly to read