outsourcing

moving the code in external js files.
also, starting the infrastructure for runtime site/category retrieving from a json file.
sites and categories are now in a separate json file

also, removed some log.
fix space