Converts between all three bases

Converts between hex, dec and bin fully. Killed any memory leaks plus
malloc related read errors. No errors in valgrind as far as I can tell.