added commentary, removed unused code/imports