Better property detection
Code cleanup