Refactoring many things and adding manager