Streamline ui code