added support for custom adf.ly domains. Fixed a few bugs.