Made some fields public
Adjust some access levels, move some code