Make this more of a library that can be used by other pages as well.