made boolean variables booleans, removed unused variable