Added some gallery support, some stuff still broken.