Remove useless repository check
Indent
Improve coding style