Some stuff.
Moved some code to effects.c