fixed code formatting and made internal classvariables private, access v...

I made the classvariables private and added the getters.
I also used the autoformatting of NetBeans to make the code cleaner.