made minimum PS requirement v4.0 due to 3.0 bugs, replaced use of headers with parameters where appropriate, fixed guid in uninstall script