Updated documentation and some cleanup