Added specs and removed old code in the helper