Streamlining code for reuse