split simple function generation methods into separate class (fixes #1)