Updated hSync algorithm; Added unit-tests for hSync; Added examples for hSync