Added tests and refactored rules parser till self.tvsData part.