added IR, timing fixes, refactoring of message sending