Working filtering. Needs some cleanup and features added still.