Docs, some refactors, changed version and added legal headers.