Finished sorting and filtering algorithms

Fixes #75