Replaced next and previous if statements with ternary operators
Merge branch 'master' of https://github.com/arbourd/cst8257