Implemented Settings and IDeactivatableComponent

Also fixed some bugs-