Klass with api

This is another pull request that includes the Klass API stuff. For later.