Add Categories logic and Tests