Update docstrings and refactor resolve a bit