Condensing Code

Yes - they're called functions or macros.