restructured, majorly refactored, added async to Gallery.js