sites.json is now written with spaces for better readability
moved utility functions to util.js
add simple unit-test