cleaned up class names and updated factory