Updated tests to new API
Major rewrite to simpler API
Update examples