Code cleanup and fixes for boto modules