Modularized a little