reformat the whole code; fixed typo in packages and classes