Revert "Redid all the code. Will branch and push it there."

This reverts commit 091dacb4419a56d1f00500b6161913bff162f4c0.