Fixed main loop logic. Now supports single/multiple input/output.
Merge remote-tracking branch 'origin/master'

Conflicts:
	config.py
	pipeline.py
	utils.py