Included XML deserialization, also some refactoring (already lol)