Wilson has suggested (and I defer to him on architectural issues like this) that the focus code should be integrated into lib/camera.js.  So I think most or all of this file is in the wrong place.

Please be sure you have read the recent email thread about focus.  Prasad and Youngjun were on that thread and should be able to send you the messages. One of the items on that thread was Wilson's suggestion that this all go in lib/camera.js.