clean up codes

- use logging wrapper instead of the log package
- rename many things to better names
- add some documentation
- add capacities to slices where possible
- serve pprof from its http service