Refactored status page scripts