Revert "cleaning up and slight modifications"

This reverts commit a939f5e80e2e0dd9ce07da94b0788eec2554c16f.