Minor issues.
Bit more of the offset thing is done; implementation for rectangular shapes still missing.