Minor changes.

Swapped list for set in constants for faster membership checks.