About your question about how to make it compatible with beamer:
The very minimum to make it not incompatible with beamer (i.e. compiles but maybe the output does not make always sense) would be
- not reload xcolor/hyperref with conflicting options if the beamer class is loaded
- don't overwrite the `hyperref` settings if the beamer class is loaded
- not redefine qed and problem if the beamer class is loaded
- don't load enumitem if the beamer class is loaded
In the bigger picture, there might be many problems with actually using it in a beamer document, for example a beamer slide won't h…