Make code confirm to code style

* indentation 4 spaces
* export statement at the end
* trim trailing white spaces