Beautify the code with tab indent

made some minor changes