Adding test and cleaning up formatting