Implement transaction and DataStore API, fix InternalDataStore stuff

#119 #90
Sorry forget to do the changes to InternalDataStore on separate branch ><
friend the Transaction, and make this private.