Code cleanup

Moved the determining of the handle size into a class method.