Removed chai from test dir and some api changes.