Make it work with the latest ThunkJS + better tests