Couple of issues:
- Fist/last frame calculation was wrong
- Keyframe selection might silently fail leading to unpredictable math
errors all over the place. Now if keyframe selection fails solver wouldn't
run.
This makes headers a bit less clean (with the anonymous structs
mainly and headers inclusion from another header.
Makes compilation with clang a bit less noisy.