First try at adding tests to routes.js and potential internal bug discovery