Added boundaries

Added support for non-aligned boundaries, not quite there yet but worth
committing as a WIP