Changed attributes visibility and added getters and setters