Small style changes, add tests