Cleaned up refactored approach