Revert "Cleaned up code"

This reverts commit f544edbaeef5e2efe82a450a6a3574418ab2f2fe.
Revert "Revert "Cleaned up code""

This reverts commit 775af8c813b6f873c337ac3a561c1e755d4a014f.