Defragmentation and manipulation work

Added a missing include guard... I'm an idiot.
Added finalization of GMK resources.
Added some proper manipulation methods.
More defragmenting code.