Modified file to include fixes from Ken.