subroutines refactored

subroutines now accept variables on the stack, not through registers