changed some types to be consitent, prepared for better IoC usage