Cleaned up output code