cleaned up instance management