Some manual fixes / cleanup merge