major refactor to console framework