Cleaned up return codes

Fixed Content-Length header