cleaned up status page code