Modifed some missing of style issues and added unit test