Some more redundant checks removed + more comments.