Updates to allow custom locations.

Added tests.