Revert "Refactured a bit"

This reverts commit 10a3ed53af504a35f6f9ddb715d4b684aa5b99d3.
cleanup