Code clarity improvements

Documentation addition and cleanup
Variable name cleanup
Made string constants
Removed duplicate code for edge finding