Cleaned up code for release.