Variable assertions

plus some cs fixes