Bug fixing Jig parser , clean-up
adding unit tests