Fixed syntax and missing imports