Fix frequency measurement example
*Allow passing of API values for more functions

*Add handle=None to init