added example config file and cleaned up core