updates

- added test cases
- updated a few links
- added contents of the test.html
- corrected a problem in the populate media function