Added tests
Added Referer validation