Fixed issue #4 by rebuilding the mod input based on the rest input. Also added the correct message date handling.