Refactored for my go-cjdns changes