Refactored for better support of multiple connected entities
Added peek function for better controlling transfers (Not fully tested yet, usage of hooks may need to be tweaked)