More functionality, documentation, licence and cleanup