refactored to distinct packages, started registration