Code cleanup for general usage.