Clean up core

Drop ordereddict dependency, move config template to core.