Code improvements, removed redundant hasClass() calls