improvements on JS perspectives + moved most perspectives to js