fix types. fix method result combination and misc. refactoring.