Simplify and clean up new perspective code