migrated ifgram to core, massive cleanups