Escaping spaces is now inside the methods and not inside index.js. Also added a test case