Split big method into 3 small methods.