further cleaning, formulation of tests and taking out code that was dead and not fully working