added distance tests to javascript
added odd/even tests to distance js testing
added diagonals js tests
recatored