removed filename dependency, tweaked the quadsort a bit