adding some files missed in the last commit. moved some javascript to
separate files. other improvements