Update implementation to be more robust, add documentation and rename to cross_origin
Add automatic unit testing