Misc bug fixes.
Code refactorization.
Misc bug fixes, added Expression and continued with statement factory.