Moved to property bag and fixed a few bugs