Added proper clipping for x and y outside the area
Fixed the namespace caps