Added rewrite rule flushing. Fixed version IDs.