Some refactoring. Attempt at property handling