Format code and cleanup.