update types in docs as per scrutinizer
refactor models