Reorganized code, added borrow methods