wiped away ugly stuff and added licenses

Cleaned a bit of the code, updated the documentation, added notes and
also added the licenses.