Refactored.

Refactored the entire class and changed the form mating style.