Refactor code format