Improved javascript, 3 simple tests, added requirements