Rewrote server in javascript.