Re-organizing into classes