Refactor readme code