Changed protection levels and fixed classes