Code cleanings & minor features