Implementation of gallery management

- Rewrote gallery index
- Rewrote gallery show
- Rewrote gallery creation
- Updated relations
- Rewrote image index
- Rewrote image show
- Rewrote image creation