Added Unit Tests, Fixed issues with template bindings

Added unit tests to cover expressions and bindings.
Fixed problems with the template bindings and the order that bindings
are applied.
Fixed minor bugs in expressions.
Refactored Expression base class into an interface for better
performance.