Adding some docs
add some optimizations
fix setup.py