more refactoring earninsnotifier and package structure