Adding missing files from previous commit, tweaks needed to work with LWS