Implemented hard loading/unloading logic in javascript ScanApplet class wrapper