Modularize

Modularizing things a little bit