Fix balance function; clean up insert method.
Fix tests for balance