Changed class name.

Also made functions more generic.