changing ws to localhost, removing debug mode