Refactoring of database queries.
Added readme
Cleaned-up variable names etc.
Hint at consecutive message concatenation and the right todo