Updated code to work with Go server, will need more changes once we confirm some final details