Reduced data travelling over the wire to improve performance lost in
serialization. Also removed redundant code.