Making code object-oriented and consolidated