Splitting script into classes and moduli