Refactored some elements of schema