updated code style and docs; added support for data attributes