Updated JS structure, will update readme soon on use