Break up admin overlay code for reuse