Cleaned up console code.