Work on new loan page
Brought branch up-to-date
Fixed errors and added safety checks
Merge branch 'newloan'