Added the possibility of definining a default client
JS snippets can be run before
Many plan related improvements