added a lot of code. Mostly in transfers.js