reorganized files and added ajax post to nodejs server