Cleaned up a bit, tried a different idea that didn't work/might work with some more thinking