indentation fix & code improvements