Moved global variables and init() function to server.go (where main() is)