JS reorg for albums/images, removed duplicate and unwated code