deleated obsolete parts of the js code