Fixed last commit.
Added some forward declaration do minimize includes.
Removed debug text from classfactory.
Fixed some picky compiler warnings.