added some performance improvements to server