More refactoring; start testing console application