Fix and optimize some last minute things