Converted Object to Class

Added a few methods as well that removes some of the ambiguity when adding bool values to return ints in several cases.

Also added some checks for null pointer objects.