refactoring to support multiple instances per page
initial pass at making library work with new data structure
fixed broken zoom/pan