Revert "Undo stuff and do it in cleaner way"

This reverts commit 4bd230bf2ad03b48ba9acb98ea130931fcb675a9.