Indentation and grammar refactor