Refactoring character and characterloader