added semicolon to end of messages
minor style edits
embedded collision avoidance into getIR()

untested (motor issues)