Fix warnings and advanced compilation