Chat commit

Chat core functional, database included