Cleaning up logic
Much better cleanup
bad merge