Mention MIX_ENV on compile.protocols
Improve typespecs and docs