Added API documentation

- Also made small changes to interface.
- K-d tree branches now choose split axes based on bounding box geometry.