Cleanup of gadget server codebase

Just some cleanup to get rid of a bunch of warnings in Eclipse.  Take 2 - after rebasing.