Added writeobject method with very hacky method of writing data lsb first.