commit the changes for deposit and transfer

These changes makes deposit and transfer functionality available and uses entity api rather than direct database queries.