Changed heuristics and added a yaml for syntax strings

The checks are now performed in a more generic and scalable way.
Also added a syntax.yml with string for Perl and Prolog