Various modifications. Loop frequency of vf increased (was insuficient).

Some fixes in the handlers.