Cleaned up URL generation for stock example