Merge pull request #71 from wilsonge/feature-ajax

Declaring variable badly
fixed smiley removing previous text + reduced code dramatically
js variable removed
Merge in upstream changes
More consolidating of the JS