Start using cmp::min now that num::min no longer exists
Use libserialize for Base64 encoding now that its moved there
Fix formatting on a comment