Tried figuring out the limits of internal variables, was too tough
Back to working state
Need to test thouroghly with VSIM now