put the global functions in a class

Not sure if anyone is associated with this project anymore...

I put all the logic in a class instead of using the global namespace. Also, moved the male/female data out of the class file.