Initial commit.
Bug fixes and enhance for real world use cases.