Multiple changes to work with the PRISM library