Changed class structure per Gabriel's recommendations.