Making the Origin Setable

There is also some refactoring so I coudl stick a proxy inside as well.
done.