Bunch of bad code
Revert "Bunch of bad code"

This reverts commit fcf27eefd26dfc28b972f68ea487332e2f48291b.