Many bug fixes, added iohub and configuration