update marked and general cleanup