Remove all #region blocks
Set better names for some variables. Fix spelling mistakes. Change internal to public.