Base-n to decimal; decimal to base-n

Generalised base conversions. Maybe overkill? :P