Fixed issue with trailing slashes
Tidied tests and removed debug prints