apply options in non-dumb order
fix limits, add tests
set limit to 0 rather than delete
sort start and end