Clean up varables name, fix doc