Refactor (extract class)