Extracted a spec path helper, and updated parameter names to be more descriptive.