Cleanup update code
Merge pull request #95 from ping19/master

Cleanup updateEnt() code