Cleaned messages and removed unused code.