Updates as consequence of testing

Added test.js and some changes made on function.js as consequence of
testing the populateForm() function.
Also added a clear form button.