Cleaned up code for adding provider id