bug fixes and first docs draft