major clean up, simplification