Modularize functionality