Moved the magic madness into a magic trait. I feel dirty.