Finishing foto.js functionality