Fixed review comments and added spec test