Rewrote ConsoleApplication - fixes #2 and finally #5