Fix some floating-point inaccuracies, as well as add a 'raw-balance' command for debugging.