API v2

A slight update and simplification, versioning introduction and so on!