working on the js code more, also remove unused api functions