Cleaned up code in the Lookup pages by creating a superclass for them.