fixed deprecated clientHeight to client.height. The same with width.
Code cleanup.