fixing some bugs I found (listed in basecamp). And working on the renewal logic