Code cleanup for improved portability.