fixed indentations and some unnecessary test codes