Add doc badges and refactor