Correct memory issues
Fix subscription relative URL strings

As reported by Colin Devroe on Twitter : https://twitter.com/cdevroe/status/517764395183915009 and https://twitter.com/cdevroe/status/517764086478958593
Comments for future developments
More rigorous testing of URL strings
Merge pull request #2 from barijaona/issue-315

improvements on the fix for issue-315