Refactorings to provide interactive console