Adding unit tests
Fixed jumping bug