Fixing nits based on nj's feedback
Adding test to ensure correct behaviour with $0