Finished the Gadget structure + minor refactoring