Adds template for freetext state
Adds test for freetext state