Handle null context
Fix tabs/spaces