Refactoring

adds consoleAPI tests