Able to add customized filters to handle pseudoselectors.

This pull includes previous one, focus on last commit.