Added code to make 'if', 'elif', and 'else' all execute exclusively. This is untested.