fixed bug in PCA fn, fixed js plot so it now renders