Changed Message loop to use Action() instead of Custom Message