Formatted code, added getters and setters