Refactored the instance class