start to simplify typemaps - extracting all code into functions
start to simplify typemaps - extracting all code into functions

lisitsyn/shogun,geektoni/shogun,lisitsyn/shogun,lisitsyn/shogun,lambday/shogun,karlnapf/shogun,lambday/shogun,shogun-toolbox/shogun,Saurabh7/shogun,sorig/shogun,Saurabh7/shogun,shogun-toolbox/shogun,lisitsyn/shogun,besser82/shogun,sorig/shogun,Saurabh7/shogun,Saurabh7/shogun,Saurabh7/shogun,shogun-toolbox/shogun,Saurabh7/shogun,shogun-toolbox/shogun,Saurabh7/shogun,besser82/shogun,sorig/shogun,geektoni/shogun,lambday/shogun,Saurabh7/shogun,besser82/shogun,Saurabh7/shogun,lisitsyn/shogun,lambday/shogun,shogun-toolbox/shogun,karlnapf/shogun,lambday/shogun,lambday/shogun,besser82/shogun,geektoni/shogun,karlnapf/shogun,karlnapf/shogun,sorig/shogun,sorig/shogun,geektoni/shogun,sorig/shogun,karlnapf/shogun,geektoni/shogun,besser82/shogun,geektoni/shogun,lisitsyn/shogun,karlnapf/shogun,besser82/shogun,shogun-toolbox/shogun