bugfix jessiecode: re-add missing return statement
implemented conditional operator ?: and internal function IfThen() (both do the same thing: return a value based on a condition)