Updated for new version of Stan. Partially converting to Winston.