Refactoring code, add properties