Added console test application for smoke testing (at least for now, we will probably decide to remove it once we have 100% unit tests). Fixed some minor bugs.