Refactored software structure