fixed test compilation and make all internal* public