Moved checks for neighbor types into carbon, oxygen etc. functions. This should make it easier to determine which types to add to the blacklist for a particular rule.