Refactored schema construction from factory into class constructors