Changed day from int to text

Fixed messages by breaking into four js functions