support for tabs and general cleanup