improving nested options handling + misc