Refactoring of breakboints and JS bug fixes