Fix identation and small bugs