Refactored, still not satisfied