Streamlined code paths to avoid code duplication and bugs