Added caching of result and refactored server.coffee