reduced the parameters in read_gadget, and starting cleaning unncessary things