Removed invalid indentations and few bugs