Badge refactor, small fixes, npb changes