Refactoring

Type providers now returns Rule prototype and rules collection