Fix undefined error
fix key value
Various coding style fixes
Can't call reset() on virtual property