Refactored specs and added more specific tests