Cleanup of gadget server codebase

Just some cleanup to get rid of a bunch of warnings in Eclipse.