Added tests and moved to_addresses to settings