Applied various fixes