starting refactor to add lots more features.