Added 'amount' field in buyings + some small changes