Improved efficiency of constructObject(). For #37