Hierarchical Modeling with Subroutines