6ef44ddb9b
lot of code cleanup and getting rid of trailing whitespace, try to make it a little more uniform. document some changes in comments