Fixing JS and Python makefiles, code cleaning