Use classes and objects to rewrite the project