Updates for codacy, fixes issues