format code
remove unnecessary tests