Refactoring rp_js by extracting javascript into separate files
More refactoring in the rp_qr