Minor changes, removal of comments and unnecessary conditions