fixed all known bugs, extended docs