refactor HistoricLoans (loanhistoryactions), LockAccount and MediaReadyToPickup