Updated layout and local predicate names.  Added basic comments.