Some optimisations.
Simplifying the object extraction a bit.