Add tests and add relative urls support