Fixing bugs, adding few more features and test files