General cleanup of code.