extracted superclass + some fixes

Signed-off-by: humanbeen <human.be2n@gmail.com>