Fixed 'headers already sent' issues.
Removed exception catches.
Improved codebase.