Extract long code as small methods