Implemented Filter functions and fixed some parsing bugs