Moved selection rectangle construction to own class