update: code clean up, comments