Changed from tabs to spaces. Plus minor tweaking