feat(server): refactored lexing code into a Lexer
chore(server): extracted filter code into it's own component