Added test cases, made some twigs

Signed-off-by: Arpit Goyal <agmps17@gmail.com>