Made several changes to make show pages work and refactor some issues