A serializable rules engine