Got samples UI mostly working (still needs project-sites live filtering)...

.... Refactored some JavaScript to reduce code redundancy.