Fix issues with contract server

Probably makes sense for us to investigate some sort of logging framework in the future so we don't need to uncomment console.log calls.