Added if STATEMENTS functions

Also tried out a different approach to explicit typing.