Fixing duplicate method and JSNI formatting