Fixes #4 nan issue
Input check grid. Fixes #3
Input check in velocity.update. Fixes #1