Whitespace characters cleanup

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Python 3 compatibility fixes
Metaclass and type fixes