Optimize (reduce unnecessary local vars) stock2