Slight refactor of createInstanceFromClass