Merge from master into main
code refactor: updated code for better readability and managing, made smaller methods so everything is easier to manage
code refactor: updated code for better readability and managing, made smaller methods so everything is easier to manage