replace $post->ID with get_the_ID(), see #27
sanitize classes, see #27
add wrapper class and wrapper ID, fixes #32 and #39