Rename some peer variables and improve logging
Make the transport states contained in an enum instead of constants