style changes and some tests