Moved layer, point2 and rect2 to core