[REFACTOR] started to extract all kinds of classes to make code more readable.