Added test cases to default text
Moved code from index.html to here
minor fixes