Remove unused gmapi code
Large gmapi/general clean up