Added constraint methods for advanced example.
Added first try for even more complex example.