Cleaned up handler and pipeline code. Now using objects
More codec and header improvements