cleaning code/small fixes