Updated filter function. A lot faster now. (Does not depend on moment.js anymore)