Various incomplete fixes