tweaked the api a bit
added the javascript files and tweaked the backend a bit.