updated docs, added licences, style improvements