add Facility and Loan
fix code styles and add comments