Cleanup and R2014b fixes

Cleaned demo, optimized templatematch, and prepared for changes in
R2014b
Revert "Cleanup and R2014b fixes"

This reverts commit a2b59c848ab558acdb8c6ff105e9b8ae9952face.
Revert "Revert "Cleanup and R2014b fixes""

This reverts commit 952bcecea5bf9cce89b7eeb251e527df1541ca82.
deleted testing.