Borrow check trigger and simple functions added.
Some views added, function for borrows adding added.