Redid in source documentation
Code cleanup