Making Http Referrer addition better!

- Code cleanup