cleanup & minor improvememnts