There are many code repetitions throughout the project which are making the code files bigger. Here are a few of the changes that I have done to make the code DRY.
If the changes are looking good, I will try to do the same for the whole project in my next MR. Let me know.