Added Prism and moved some code around