Replace hardcoded class references

Replaced with classmethods.