Code refactoring, better data structure organization
Various refactoring