refactored actions
factored out stuff
refactored loans
refactor complete