Changed to be compatible with API changes.
Refactored style to styles.