fixed typo
refacored a lot of things
updated sphinx's doc