Adjusted whitespace and added unit tests