rename size to figsize to avoid name space collision. minor code cleanup