Improved indenting for end(if|while|for...) and added the 'function' keyword)