[BUGFIX] Clean up code a bit.