Made it so that localhost and port are not hardcode. fixes #1