Made relay unction case insensitive, added more events to relay. probably fixed something and don't remember.