Changed the code completely, added classes, methods and character saving