Improve the marquee selector, slight refactoring