Code refactoring
Working remaining some issue