Update code and added new tests
Added stubs and update c code