general cleanup, refers to #144