Added undocumented features and rearranged others.