Fix some class visibility issues