Convert the script to Object Oriented