simplify some functions and added support for multiple Class-Extensions