Collapse if statements for readability.
Add private constructor to prevent instantiation.