Updated according to comments: fixed indentation, merge test cases, and
updated comments