Add MessageLine, UserRank, smaller code fixes and cleanup