Fixed errors and warnings in non-dicey parts.