Commented code and minor code clean-up