Added test, made some more style changes