Tried to fix/simplify it.

I'm not entirely sure why this doesn't work. Any help is appreciated.