Further refactored