Re-wrote console class.