Frames now locked according to 'exclusive' parameter. Implemented tail recursion to avoid overflowing the stack.