a big update

big cleanup in code, removed the ToSend object, added the splitting of messages larger than 512 bytes, some adjustements in some functions, functions can now request channel info