cleanup.
Added message delivery test.
Removing unused whitespaces.