Converted script to object oriented to keep the namespace clean.