Major updates. removed unnecessary cruft, allows document options to be passed to hlsart.