JavaScript project. Calculates debts within some group of people