Code clean up.
Updated version.