Refactor packages and add xml serializator