UI cleanup, handling FOUC