Tiled Gallery: No unnecessary margin in style.

Margin is defined both in style attributes as well as CSS. No need for a duplicate declaration since the CSS rule defining the margin is defined as !important.
Tiled Gallery: Extract layouts to strategies.

Extract different Tiled Gallery layouts to strategy objects so that the source is easier to navigate.
Tiled Gallery: Extract HTML generation logic.

HTML generation logic is separated into templates and partials.
Photon: Tweak data-recalc-dims regex.

The regex adding the data-recalc-dims should not care how many whitespace characers there are between the closing tag and the possible following link tag.
Tiled Gallery: Split data-original-size getter.

Split the function that produces the string into data-orig-size (for carousel) into two. When meta width and height are separated, we avoid having presentation logic pieces in the model object.
Tiled Gallery: Pass context to partials as param.

Avoid having to litter the object instance (by putting stuff into `$this`) for partials, and allow the `template` and `partial` functions take a context array whose values will be extracted to the symbol table. Context required by partials is now passed via the context param.
Tiled Galleries: Extract individual item template.

Use an individual item as a partial instead of a template for all items for better code sharing.
Tiled Galleries: Use context array for templates.

Use context array for passing variables to main templates instead of littering the object instance with instance variables.
Tiled Galleries: Fix indentation.

Indent div further.
Tiled Galleries: Update square gallery classes.

For resizeability.
Tiled Galleries: Fix PHP errors.

Fix PHP errors by fixing a typo and adding default parameters to
overridden functions. Also context is properly passed to child template
in circle galleries.
Tiled Galleries: Add styles to all groups/rows.

Also square and circle galleries have inline styles applied to their
rows and groups.
Tiled Galleries: Use braces.

Always use braces.
Merge pull request #526 from rase-/reorganized

Tiled Galleries code reorganization