cleaned up remote.js