Refactor to keep layer/line pointers permanently.