Fixed a Bug in ErrorManager and finised? Pipeline execution code.

Someone more clever than me could make it prettier.