print errors and warnings to stderr, rest to stdout + (for this) restructure some internals

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>