remove old code, fix some formatting