Moved RestTemplate to config file

Moved RestTemplate to config file and added setter injection for it.