Fixed code inconsistencies and made panorama.js independently usable.