Implented a better origin check
 - Closes #5
 - Removed parseUri, it is no longer needed