Unification with JS SDK, sharing core files, refactor, tests