Added message date to template
Code cleanup
More test cases. Concurency issue resolved.