* fix: fix order of page categories with raw type
* refactor: change method location and others
* refactor: fix method names and variables also split methods to be clear their role
* fix: fix variable name
* fix: change the method to group of pages
* refactor: replace filter metethod to querying database
* refactor: fix typo, rename variable, add comments, improve code quality
* fix: add exit infinite loop
* fix: replace exiting loop to throwing exception