style changes, bug fixes