Multi type events OnEvent declaration handling fixed
ContentLength calculation refactored