Changed some fields to private and created getters