Rewrite module thingy.

Aaand I think this is even worse. Go figure.