adding resources, beginning to restructure js