Revert "Some dirty code"

This reverts commit 05c32c67658201824299d4db7faf5de66f77d3b0.