Added basic inference support and unittest.