Added a test for fraction and also made some minor changes.