api indentations and fixes