General debugging and cleaning up.