Updated documentation
Cleaned code