refactoring

- replace tab to space
- rename, separate some headers
- dispatch parallel/non-parallel for loop by minibatch size
- add comments
update readme, build script