Revert "Code cleanup" and cleanup once again

This reverts commit f85ed89b2837673acf724622d764a4bb879036ee.