Replace regexp maching with simple string matching for the performance, remove unused vital modules and fix a little bug