Made some improvements to the object parsing