Refactoring directive

Mainly just trying to clean the redundant if-statements that could be expressed with ternary statements.