Added the ability to split payment transactions.
Minor refactorings to DAO.