Moved baseInit code from CPlugin to base