Modularized some stuff