Removes deprecated host/port params. Adds metadata param. Adds new classes to better support refactoring and maintenance.