Type hinting sharing

@PVince81 @DeepDiver1975 please review
changes suggested by scrutinizer and own review