text: /**
   * Meteor Collections.
   * @class Mongo.Collection
   */
  
  /**
   * Add an additional field (or an array of fields) to a schema.
   * @param {Object|Object[]} field
   */
  Mongo.Collection.prototype.addField = function (fieldOrFieldArray) {
  
    var collection = this;
    var fieldSchema = {};
  
    var fieldArray = Array.isArray(fieldOrFieldArray) ? fieldOrFieldArray : [fieldOrFieldArray];
  
    // loop over fields and add them to schema
    fieldArray.forEach(function (field) {
      fieldSchema[field.fieldName] = field.fieldSchema;
    });
  
    // add field schema to collection schema
    collection.attachSchema(fieldSchema);
  };
  
  /**
   * Remove a field from a schema.
   * @param {String} fieldName
   */
  Mongo.Collection.prototype.removeField = function (fieldName) {
  
    var collection = this;
    var schema = _.omit(collection.simpleSchema()._schema, fieldName);
  
    // add field schema to collection schema
    collection.attachSchema(schema, {replace: true});
  };
  
  /**
   * Global schemas object. Note: not reactive, won't be updated after initialization
   * @namespace Telescope.schemas
   */
  Telescope.schemas = {};
  
  SimpleSchema.prototype.getProfileFields = function () {
    var schema = this._schema;
    var fields = _.filter(_.keys(schema), function (fieldName) {
      var field = schema[fieldName];
      return !!field.profile;
    });
    return fields;
  };