IssueID #31 : refactoring code structure