More organized way of extending a plugin?

I dislike having hundrets of lines of code in my strapi-server.js , extending the users-permissions plugin. It’s cluttered and it takes time to find stuff.
Is there a more organized way to do so, e.g. with sub-folders? Couldn’t find anything related to that in the docs. Can someone perhaps point me in a vague direction?