Refactor code
Abstract code